import { LikeDto } from "@/interface/like";
import request from "@/utils/axios";

export function likeSomething(data: LikeDto): Promise<any> {
  return request({
    url: "/like/add",
    method: "post",
    data
  });
}

export function unlikeSomething(data:{createId: number, type: number, id?: number}): Promise<any> {
  return request({
    url: '/like/del',
    method: "post",
    data
  });
}

export function findLikeTotal(): Promise<any> {
  return request({
    url: '/like/queryLikeTotal',
    method: 'post'
  })
}